package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class RifleShot extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = 6934189563675548113L;

	public RifleShot() {
		this.setName("Rifle Shot");
		this.setIconName("rifleshot");
		this.setDirectDamageType(EDmgType.ENERGY);	
		this.setAmountModifierPercent(-0.5);
		this.setCoefficient(0.5);
		
		this.setTrainableLevel(1);
	}
	
	@Override
	public String getDescription() {
		return "Shoots your rifle at the target, " +
			"dealing " + this.getMinDirect() + " - " + this.getMaxDirect() 
			+ " weapon damage.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce();
	}

	@Override
	public double getMaxDirect() {
		return 
			this.getAmountModifierPercent()
			* this.getCharStats().getRangedDamagePrimaryMax()
			
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce();
	}

}
